package com.ljw.hmall.clients;

import com.ljw.hmall.config.MyFeignInterceptorConfig;
import com.ljw.hmall.pojo.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "userservice",configuration = MyFeignInterceptorConfig.class)
public interface AddressClient {

    @GetMapping("address/{id}")
    public Address findAddressById(@PathVariable("id") Long id);

    @GetMapping("address/uid/{userId}")
    public List<Address> findAddressByUserId(@PathVariable("userId") Long userId);
}
